home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 11
/
CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso
/
propage
/
genies
/
donsgenies
/
don'sgenies
/
importbitmap1to1.pprx
< prev
next >
Wrap
Text File
|
1993-05-25
|
1KB
|
56 lines
/* Import bitmap with a scale of 1:1, assuming a screen resolution of 75 dpi in hi-res.
Written by Don Cox July '92 Not Public Domain. All rights reserved. */
signal on error
signal on syntax
address command
call ppm_AutoUpdate(0)
call SafeEndEdit.rexx()
oldunits = ppm_GetUnits()
call ppm_SetUnits(1)
box = ppm_ClickOnBox("Click on destination...")
if box=0 then
do
call ppm_Inform(1,"No box selected",)
call ppm_ClearStatus()
exit
end
gone = ppm_DeleteContents(box)
filespec = ppm_GetFileName("Select bitmap image file","","")
worked = ppm_ImportBM(box,filespec)
info = ppm_GetBoxInfo(box)
width = word(info,2)
height = word(info,3)
if width>400 then do
width = width/75 /* screen images at 75dpi for high res */
xscale = 1
end
else do
width = width/37.5
xscale = 2
end
if height>360 then do
height = height/75
yscale = 1
end
else do
height = height/37.5
yscale = 2
end
call ppm_SetBoxScale(box,xscale,yscale)
call ppm_SetBoxSize(box,width,height)
call ppm_SetUnits(oldunits)
call ppm_AutoUpdate(1)
exit